import { UserEntity } from 'src/user/entities/user.entity';
import {
  Column,
  Entity,
  JoinColumn,
  ManyToOne,
  PrimaryGeneratedColumn,
} from 'typeorm';

@Entity('user_info', { comment: '用户信息' })
export class UserInfoEntity {
  @PrimaryGeneratedColumn('uuid')
  id: string;

  @Column({ length: 36, comment: '用户id' })
  user_id: string;

  @ManyToOne(() => UserEntity)
  @JoinColumn({ name: 'user_id' })
  user: UserEntity;
}
